<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function flattenOnce(arr) {
            return [].concat(...arr)
        }

        function throttle(func, delay = 300, I = null) {
            return (...args) => {
                clearInterval(I)
                I = setTimeout((...args) => {
                    func(...args), delay
                })
            }
        }



    </script>
</body>

</html>